Distributed file systems offer many compelling advantages in establishing high performance computing environments. One example is the ability to easily expand, even at large scale. An example distributed file system is one that is distributed across multiple nodes in a cluster of nodes. An individual node can encompass a set of storage drives capable of storing data accessible by clients of the clusters of nodes. In some distributed file systems, files or objects can striped across different physical storage devices in a single node or across multiple nodes of a cluster. By striping blocks of a file or object across multiple drives and/or nodes, including mirroring the same blocks on multiple drives and/or nodes, individual drive or node failure can occur without preventing a client from accessing data, portions of which may have been stored on the failed drive and/or node.
A file system layout can allocate segments of a file or object to be striped across multiple storage drives and/or multiple nodes. For example, when a file is initially stored within a file system, the file system may optimally write the contents of the file by striping the file across multiple storage drives according to desirable goals of the file system, such as performance, backup, etc. While initially, a proscribed layout may be beneficial or tolerable by the file system, operating conditions of the file system may change making a restripe of the file desirable. For example, if segments of a file were stored in a drive that has since reached capacity, is unbalanced, or has since become unusable, it may be desirable to restripe the file so that its segments are no longer affected by these changed conditions. Thus, restriping refers to the act of updating the layout of a file structure. It can be applied to all allocated segments of a file, including clones of the same segment of a file.
The basis of a restripe operation is a cursor. A cursor represents is the basic of the iterative process to restripe a file. A protection group can signify to the file system how the file system should store and protect data. The cursor works through the file to change the protection group of a file, on a block by block basis. One method to restripe files is by using a single cursor per file. When using a single cursor approach, restripe work is also limited to a single thread per file. In addition, a single cursor approach may also lead to locking the entirety of a file during a restripe operation.